using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using UnityEngine;
using UnityEngine.SceneManagement;

public class GameManager : MonoBehaviour
{
    public static GameManager instance;

    private void Awake()
    {
        if (instance != null)
        {
            Destroy(instance);
        }
        else
        { 
            instance = this;
        }
    }

    public void PlayerDie()
    { 
        UIManager.instance.ShowDeadUI();
    }

    public void ReloadScence()
    {
        ReloadManager.instance.ReloadGame();
        UIManager.instance.UnShowDeadUI();
    }

    public void BackMainMenu()
    { 
        SavaManager.instance.SaveGame();
        SceneManager.LoadScene("MainMenu");
    }

    public void ExitGame()
    {
        Application.Quit();
    }
}
